package com.only4play.practice.usercenter;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.annotation.MapperScans;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScans;

/**
 * @author mengdy
 */
@SpringBootApplication
@MapperScans(
        {
                @MapperScan("com.only4play.practice.usercenter.core.mapper")
        }
)
@ComponentScans({
        // 扫描自定义异常，不然不生效
        @ComponentScan(basePackages = "com.only4play.practice.common.exception"),
        // 扫描自定义配置类，不然不生效
        @ComponentScan(basePackages = "com.only4play.practice.common.config")
})
@Slf4j
public class UserCenterCoreApp {

    public static void main(String[] args) {
        SpringApplication.run(UserCenterCoreApp.class, args);
        log.info("user-center-core started");
    }
}
